#include "iBe.h"

WorldPtr World::inst;

World::World()
{}

WorldPtr World::instance()
{
  if ( !inst )
    {
      inst.reset( new World() );
    }
  return inst;
}

void World::draw(RenderPtr _render)
{
  SceneManagerPtr sceneManager = SceneManager::instance();
  ScenePtr scene = sceneManager->getFrontScene();
  scene->draw(_render);
}

void World::update(const UINT64 &_time)
{
  SceneManagerPtr sceneManager = SceneManager::instance();
  ScenePtr scene = sceneManager->getFrontScene();
  scene->update(_time);
}
